package com.aceitunaproject.server.entity;

import java.awt.Point;
import java.io.Serializable;

import com.aceitunaproject.server.player.Player;
import com.sun.sgs.app.ManagedObject;

/**
 * @author Federico Bergstein
 * 
 *         This interface represents the common functionality of any entity in
 *         the game (such as Units,Installations and Settlements)
 */
public interface Entity extends ManagedObject, Serializable {

	/**
	 * @param name
	 *            the name to set
	 */
	void setName(String name);

	/**
	 * @return the name
	 */
	String getName();

	/**
	 * returns the player that owns this entity
	 * 
	 * @return the player that owns this entity
	 */
	public Player getOwner();
	
	/**
	 * returns the player that controls this entity
	 * 
	 * @return the player that controls this entity
	 */
	public Player getController();

	/**
	 * @param currentPosition
	 *            the currentPosition to set
	 */
	public void setCurrentPosition(Point currentPosition);

	/**
	 * @return the currentPosition of the entity in the map
	 */
	public Point getCurrentPosition();

	/**
	 * @param id
	 *            the element's id in the game world
	 */
	void setId(Long id);

	/**
	 * @return the element's id in the game world
	 */
	long getId();

}
